package com.nsl.my_youlai.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nsl.my_youlai.model.bo.DocxTemplateBo;
import com.nsl.my_youlai.model.entity.DocxTemplateEntity;
import com.nsl.my_youlai.model.form.TemplateDocxForm;
import com.nsl.my_youlai.model.vo.docx_template.DocxTemplateDetailVo;
import com.nsl.my_youlai.model.vo.docx_template.DocxTemplateExportVo;
import com.nsl.my_youlai.model.vo.docx_template.DocxTemplateVo4Page;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * 角色对象转换器
 *
 * @author haoxr
 * @since 2022/5/29
 */
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING) //把该bean交给
public interface DocxTemplateConverter {

    DocxTemplateBo toBo(DocxTemplateEntity docxTemplateEntity);

    DocxTemplateVo4Page toVo4Page(DocxTemplateBo docxTemplateBo);

    Page<DocxTemplateVo4Page> toPageVo(Page<DocxTemplateBo> userPage);


    DocxTemplateDetailVo toDetailVo(DocxTemplateBo docxTemplateBo);

    DocxTemplateEntity toEntity(TemplateDocxForm templateDocxForm);

    TemplateDocxForm toForm(DocxTemplateBo bo);

    DocxTemplateExportVo toExportVo(DocxTemplateBo bo);

    List<DocxTemplateExportVo> toExportVoList(List<DocxTemplateBo> bolist);
}